fix(cli): respect ZDOTDIR and XDG_CONFIG_HOME in install, doctor, and implode#892
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
|
Tested on deploy preview with |
|
Nice work! The install.sh and implode.rs changes look good. One issue I noticed in The new Suggested fix — add a default fish config check before the new ZDOTDIR/XDG blocks (around line 477): // Also check the default fish conf.d location
let fish_path = format!("{home_dir}/.config/fish/conf.d/vite-plus.fish");
if let Ok(content) = std::fs::read_to_string(&fish_path) {
if search_strings.iter().any(|s| content.contains(s)) {
return Some(abbreviate_home(&fish_path));
}
}This way doctor detects fish configs regardless of whether |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
35bf34b to
6e79a60
Compare
|
Thanks for the review, @fengmk2! The fish default Copilot's suggestions and your inline comment have been fixed in the latest commits. |
|
@mst-mkt Can you help fix the Windows CI error? I will merge after the CI passes. And I will release a new version today. |
|
@fengmk2 However, there's a different failure now: |
issue
resolves #890
details
install.shhardcodes$HOMEfor shell config paths, ignoringZDOTDIR(zsh) andXDG_CONFIG_HOME(fish). This PR respects these variables across install, doctor, and implode.changes
install.shUse
${ZDOTDIR:-$HOME}for zsh and${XDG_CONFIG_HOME:-$HOME/.config}for fish.SHELL_CONFIG_UPDATEDis now an absolute path, and thesourcehint displays~/...or the absolute path accordingly.doctor.rsAlso check
$ZDOTDIRand$XDG_CONFIG_HOMElocations when detecting profile configuration.implode.rsAlso collect and clean profiles from these custom locations during uninstall.